﻿/*****************************************************************************
 * Hyldahl.Services.TaskProcessing                 Created by: MSH 2008.07.22
 * --------------------------------------------------------------------------
 * FileName: Configuration\TaskProcessingThreadsElement.cs
 * --------------------------------------------------------------------------
 * Copyright 2009 Martin Sixhøj Hyldahl
 *****************************************************************************/

namespace Hyldahl.Services.TaskProcessing.Configuration
{
    public class TaskProcessingThreadsElement : System.Configuration.ConfigurationElement
    {
        /// <summary>
        /// Gets or sets the task processing threads.
        /// </summary>
        /// <value>The task processing threads.</value>
        [System.Configuration.ConfigurationProperty("numberOfThreads", IsKey = false, IsRequired = true, DefaultValue = 1)]
        [System.Configuration.IntegerValidator(MinValue = 1)]
        public int NumberOfThreads
        {
            get
            {
                return (int)base["numberOfThreads"];
            }
        }
    }
}
